import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginBox from "@/components/preview/LoginBox";
import RegisterBox from "@/components/preview/RegisterBox";
import RetrievePassword from "@/components/preview/RetrievePassword";
import MainHome from "@/components/mainview/MainHome";
import SellBadge from "@/components/tools/SellBadge";
import goodsUpload from "@/components/tools/goodsUpload";
import order from "@/components/tools/order";
import goodsList from "@/components/tools/goodsList";
import UserCenter from "@/components/usercenter/UserCenter";
import OrderComments from "@/components/tools/OrderComments";
Vue.use(VueRouter)
const router = new VueRouter({
    routes: [
        {path: '/', component: LoginBox},
        {path: '/register', component: RegisterBox},
        {path: '/usercenter', component: UserCenter},
        {path: '/retrieve_number', component: RetrievePassword},
        {
            path: '/home', component: MainHome, redirect: '/mainHome',
            children: [
                {path:'/orderComments',component:OrderComments},
                {path: '/mainHome', component: SellBadge},
                {path: '/test', component: goodsUpload},
                {path: '/order', component: order},
                {path: '/goodsList', component: goodsList}
            ],
        },
    ]
})

export default router
